package com.wushijia.net;

import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;

/**
 * description:
 * @author yang
 * @date 2018/1/8 21:44
 */
public class TcpClient {
  public static void main(String[] args) throws IOException{
    Socket socket = new Socket("127.0.0.1",6666);
    DataOutputStream dataOutputStream = new DataOutputStream(socket.getOutputStream());
    dataOutputStream.writeUTF("hello server");
    dataOutputStream.flush();
    dataOutputStream.close();
    socket.close();

  }
}
